package com.anjubao.parking.municipal.parkinglot.constant;


import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum DeviceOperationStatusEnum {
    OffLine(0, "断线"),
    OnLine(1, "在线");

    private int code;

    private String desc;

    public static Boolean exist(Integer code) {
        if (code == null) {
            return false;
        }
        for (DeviceOperationStatusEnum e : DeviceOperationStatusEnum.values()) {
            if (e.getCode() == code) {
                return true;
            }
        }
        return false;
    }
}



